// 导入request工具
import request from '@/utils/request'

// 获取任务列表接口
export const taskListService = (page, pageSize) => {
  return request.get(`/user/task/page?page=${page}&pageSize=${pageSize}`)
}

// 接受任务接口
export const acceptTaskService = (taskId) => {
  return request.post('/user/task/accept', null, {
    params: {
      taskId: taskId
    }
  })
}

// 完成任务接口
export const completeTaskService = (taskId) => {
  return request.post('/user/task/complete', null, {
    params: {
      taskId: taskId
    }
  })
}

